package com.yxinsur.imc.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yxinsur.imc.common.core.domain.BaseImcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yxinsur.imc.common.annotation.Excel;
import com.yxinsur.imc.common.core.domain.BaseEntity;

/**
 * 代理人关系对象 imc_broker_relation
 *
 * @author imc
 * @date 2021-03-18
 */
@Data
public class ImcBrokerRelation extends BaseImcEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 本人的broker_id */
    @Excel(name = "本人的broker_id")
    private Long brokerId;

    /** 上级的broker_id */
    @Excel(name = "推荐人的broker_id")
    private Long brokerUpId;

    @Excel(name = "间接推荐人的broker_id")
    private Long brokerUpUpId;

    /** 该关系是否生效 */
    @Excel(name = "该关系是否生效")
    private String status;

    @Excel(name = "祖籍列表")
    private String ancestors;

    /** $column.columnComment */
    @Excel(name = "该关系是否生效")
    private String isDeleted;

    /** 租户id,一个租户id唯一对一个机构id（默认机构id为根节点id暨法人机构） */
    @Excel(name = "租户id,一个租户id唯一对一个机构id", readConverterExp = "默=认机构id为根节点id暨法人机构")
    private String tenantId;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("brokerId", getBrokerId())
            .append("brokerUpId", getBrokerUpId())
            .append("brokerUpUpId", getBrokerUpUpId())
            .append("status", getStatus())
            .append("createId", getCreateId())
            .append("createTime", getCreateTime())
            .append("updateId", getUpdateId())
            .append("updateTime", getUpdateTime())
            .append("isDeleted", getIsDeleted())
            .append("tenantId", getTenantId())
            .toString();
    }
}
